//
// Created by 123 on 2024/12/30.
//
#include "iostream"
using namespace std;

struct Student{
    string name;
    int age;
};
void chageStu1(Student student){
    student.age = 20;
}
//void chageStu2(const Student* ptr){
//    ptr->age = 20;
//}
void chageStu2(Student* ptr){
    ptr->age = 20;
}

int main038(){
    Student student  = {"zhangsan",18};
    cout << student.name << " " << student.age << endl;
    chageStu1(student);
    cout << student.name << " " << student.age << endl;
    chageStu2(&student);
    cout << student.name << " " << student.age << endl;

    return 0;
}